package print;

import java.util.Scanner;

public class PrintShaLou {
    public static void main(String[] args){
        Scanner reader = new Scanner(System.in);
        int N = reader.nextInt();
        String s = reader.next();
        int sum =1;
        int i,snum,cnum;

        for(i=2;(sum+2*(2*i-1))<=N;i++) {
            sum += 2 * (2 * i - 1);
        }

        int remain = N - sum;
        int rownum = i - 1;
        for(i=rownum;i>=1;i--){
            snum = rownum - i;
            while(snum != 0){
                System.out.print(" ");
                snum--;
            }
            cnum = 2 * i - 1;
            while(cnum != 0){
                System.out.print(s);
                cnum--;
            }
            System.out.println();
        }

        for(int j=2;j<=rownum;j++){
            snum = rownum - j;
            while(snum != 0){
                System.out.print(" ");
                snum--;
            }
            cnum = 2 * j - 1;
            while(cnum != 0){
                System.out.print(s);
                cnum--;
            }
            System.out.println();
        }

        System.out.println(remain);

    }
}
